#ifndef EquivalentBranch_H
#define EquivalentBranch_H

#include "EquivalentEquipment.hpp"
#include <list>
#include "Boolean.hpp"
#include "Float.hpp"


#include "Resistance.hpp"
#include "Reactance.hpp"

namespace CIMPP {


	/*
	The class represents equivalent branches.
	*/
	class EquivalentBranch: public EquivalentEquipment
	{

	public:
					CIMPP::Resistance r; 	/* Positive sequence series resistance of the reduced branch. Default: nullptr */
					CIMPP::Resistance r21; 	/* Resistance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.r is given, then EquivalentBranch.r21 is assumed equal to EquivalentBranch.r. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */
					CIMPP::Reactance x; 	/* Positive sequence series reactance of the reduced branch. Default: nullptr */
					CIMPP::Reactance x21; 	/* Reactance from terminal sequence 2 to terminal sequence 1 .Used for steady state power flow. This attribute is optional and represent unbalanced network such as off-nominal phase shifter. If only EquivalentBranch.x is given, then EquivalentBranch.x21 is assumed equal to EquivalentBranch.x. Usage rule : EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */
					CIMPP::Resistance negativeR12; 	/* Negative sequence series resistance from terminal sequence  1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */
					CIMPP::Resistance negativeR21; 	/* Negative sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */
					CIMPP::Reactance negativeX12; 	/* Negative sequence series reactance from terminal sequence  1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */
					CIMPP::Reactance negativeX21; 	/* Negative sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909. Usage: EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */
					CIMPP::Resistance positiveR12; 	/* Positive sequence series resistance from terminal sequence  1 to terminal sequence 2 . Used for short circuit data exchange according to IEC 60909.  EquivalentBranch is a result of network reduction prior to the data exchange. Default: nullptr */
					CIMPP::Resistance positiveR21; 	/* Positive sequence series resistance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */
					CIMPP::Reactance positiveX12; 	/* Positive sequence series reactance from terminal sequence  1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */
					CIMPP::Reactance positiveX21; 	/* Positive sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */
					CIMPP::Resistance zeroR12; 	/* Zero sequence series resistance from terminal sequence  1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */
					CIMPP::Resistance zeroR21; 	/* Zero sequence series resistance from terminal sequence  2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */
					CIMPP::Reactance zeroX12; 	/* Zero sequence series reactance from terminal sequence  1 to terminal sequence 2. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */
					CIMPP::Reactance zeroX21; 	/* Zero sequence series reactance from terminal sequence 2 to terminal sequence 1. Used for short circuit data exchange according to IEC 60909 Usage : EquivalentBranch is a result of network reduction prior to the data exchange Default: nullptr */
				
		static const char debugName[];
		virtual const char* debugString();
		
		/* constructor initialising all attributes to null */
		EquivalentBranch();
		virtual ~EquivalentBranch();
	
		static void addConstructToMap(std::unordered_map<std::string, BaseClass* (*)()>& factory_map);
		static void addPrimitiveAssignFnsToMap(std::unordered_map<std::string, assign_function>&);
		static void addClassAssignFnsToMap(std::unordered_map<std::string, class_assign_function>&);
		static const BaseClassDefiner declare();

	};

	BaseClass* EquivalentBranch_factory();
}
#endif
